package com.xyazm.product.controller;

import com.xyazm.product.domain.dto.ProductSkuDTO;
import com.xyazm.product.service.IProductSkuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 商品sku控制器
 * @author xuyou
 * @date 2022年05月15日 22:00
 */
@RestController
@RequestMapping("/product/sku")
public class ProductSkuController {


    @Autowired
    private IProductSkuService productSkuService;

    /**
     * 根据商品编码查询商品sku信息
     * @author xuyou
     * 2022/5/15 0015 22:04
     * @param skuCode
     * @return ProductSkuVO
    */
    @GetMapping("/get")
    public ProductSkuDTO getProductSkuByCode(@RequestParam("skuCode") String skuCode) {
        return productSkuService.getProductSkuBySkuCode(skuCode);
    }

}
